﻿namespace Line20.DateTimeRangeField.Settings {

    public enum DateTimeRangeFieldDisplays {
        /// <summary>
        /// Shows both date & time for the Start and End.
        /// End date & time must be later than Start date & time.
        /// Example:
        ///   start: 12 April 2014 18:00
        ///   end: 12 April 2014 19:00
        /// </summary>
        DateAndTime,        
        /// <summary>
        /// Shows the date for both Start and End. Time will be defaulted to 00:00 in the db (but not used any further)
        /// End date must be later than Start date.
        ///   start: 12 April 2014 00:00
        ///   end: 12 April 2014 00:00
        /// </summary>
        DateOnly,
        /// <summary>
        /// Shows the time for both Start and End. Date will be defaulted to 01/01/0001 in the db (but not used any further)
        /// End time must be later than Start time.
        ///   start: 01 January 0001 17:30
        ///   end: 01 January 0001 19:45
        /// </summary>
        TimeOnly,
        /// <summary>
        /// Shows the date & time for Start and the time only for End. Date for End will be the same as what was provided for the Start.
        /// End time must be later than Start time.
        ///   start: 12 April 2014 18:00
        ///   end:    "   "    "   19:00 
        /// </summary>
        SingleDateAndTime
    }

    public class DateTimeRangeFieldSettings {
        public DateTimeRangeFieldDisplays Display { get; set; }
        public string Culture { get; set; }
        public string Hint { get; set; }
        public bool Required { get; set; }

        public DateTimeRangeFieldSettings() {
            Display = DateTimeRangeFieldDisplays.SingleDateAndTime;
        }
    }
}